evaluating logarithmic expressions